<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2019/7/2
  Time: 19:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>图书管理</title>
    <link rel="stylesheet" href="css/style.css">
    <script src="js/jquery-1.12.4.js"></script>
    <script src="js/common.js"></script>
</head>
<body>
<div class="main">
    <div class="top">
        <h3>欢迎使用图书管理系统</h3>
        <h4><img src="images/timg.png" alt="">&nbsp;&nbsp;&nbsp;欢迎您</h4>
    </div>
    <div class="cont">
        <div class="left">
            <ul>
                <li>&nbsp;<a href="#">图书管理</a><span>&gt;</span></li>
                <li>&nbsp;<a href="#">读者管理</a><span>&gt;</span></li>
            </ul>
        </div>
        <div class="right">
            <div class="r">
                <div class="r-c">&nbsp;&nbsp;图书管理</div>
                <div class="r-d">
                    <span>图书名称/编号</span>
                    <input type="text" class="txt">
                    <input type="button" value="搜索" class="btn">
                    <input type="button" value="添加" class="btn">
                </div>
            </div>
            <table cellpadding="0" cellspacing="0" border="1" align="center">
                <thead>
                <tr>
                    <td>图书号</td>
                    <td>图书类型</td>
                    <td>图书名称</td>
                    <td>作者名称</td>
                    <td>总数量</td>
                    <td>操作</td>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${booksList}" var="book" varStatus="status">

                <tr <c:if test="${status.count % 2 == 0}" ></c:if>>
                    <td>${book.getbCode()}</td>
                    <td>${book.gettID()}</td>
                    <td>${book.getbName()}</td>
                    <td>${book.getbAutho()}</td>
                    <td>${book.getbNum()}</td>
                    <td>
                        <a href="DelBookServlet?bID=${books.getbID()}" >删除</a>
                        <a href="goEditBookServlet?bID=${books.getbID()}" >修改</a>
                    </td>
                </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div class="display ccc" id="display">
    <div class="display-c">
        <p>添加新图书</p>
        <hr>
        <span>图书号</span><input type="text" placeholder="请输入书号"><br>
        <span>图书名称</span><input type="text" placeholder="请输入名称"><br>
        <span>图书类型</span><input type="text" placeholder="请输入类型"><br>
        <span>作者名称</span><input type="text" placeholder="请输入作者名称"><br>
        <span>总数量</span><input type="text" placeholder="请输入数量"><br>
        <span class="btn2"><button>提交</button><button>关闭</button></span>
    </div>
</div>
<div id="return" title="点击返回首页">
    <==
</div>

</body>
</html>
